<template>
  <div>
    <div class="main">
      <el-container>
        <!-- 主体部分 -->
        <el-main>
          <!-- 查询部分 -->
          <h2 style="line-height: 20px;width:100%;text-align:left;margin-bottom:20px">优惠管理</h2>
          <el-card class="box-card">
            <strong class="font">请选择商品售价时采用的折扣方案</strong>
            <el-select v-model="value" placeholder="请选择" style="padding:0px" @change="change">
              <el-option
                style="margin:0px"
                v-for="item in menu"
                :key="item.index"
                :value="item.value"
                :label="item.menuname"
              ></el-option>
            </el-select>
          </el-card>
          <router-view></router-view>
        </el-main>
      </el-container>
    </div>
  </div>
</template>

<script>
export default {
  data() {
    return {
      menu: [
        {
          menuId: 1,
          menuname: "统一几折",
          value: 1
        },
        {
          menuId: 2,
          menuname: "满额折额",
          value: 2
        }
      ],
      value: "",
      url: "/views/clothes/colorManage"
    };
  },
  methods: {
    change(val) {
      // console.log(val);
      if (val == "1") {
        this.$router.push({
          name: "discount"
        });
      } else {
        this.$router.push({
          name: "full"
        });
      }
    }
  }
};
</script>

<style>
.font {
  font-size: 20px;
  margin-left: 70px;
  float: left;
}
</style>